package com.moliku.insurance.model.dto.insure;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 投保人信息
 *
 * @author Mr.Liu
 * @since 2021/3/5
 */
@Data
public class PolicyHolderDTO implements Serializable {

    private static final long serialVersionUID = -6597563600368936850L;
    @ApiModelProperty(value = "投保人中文名")
    @NotBlank(message = "投保人中文名不能为空")
    private String cName;

    @ApiModelProperty(value = "投保人姓名拼音(境外险需要，根据产品属性判断)")
    private String eName;

    @ApiModelProperty(value = "投保人证件类型")
    @NotBlank(message = "投保人证件类型不能为空")
    private String cardType;

    @ApiModelProperty(value = "投保人证件号码")
    @NotBlank(message = "投保人证件号码不能为空")
    private String cardNo;

    @ApiModelProperty(value = "投保人性别（0：女，1：男）")
    @NotBlank(message = "投保人性别不能为空")
    private String sex;

    @ApiModelProperty(value = "投保人出生日期（yyyy-MM-dd）")
    @NotBlank(message = "投保人出生日期不能为空")
    @Pattern(message = "投保人出生日期格式不正确", regexp = "\\d{4}(\\-|\\/|.)\\d{1,2}\\1\\d{1,2}")
    private String birthDay;

    @ApiModelProperty(value = "投保人手机号码")
    private String mobile;

    @ApiModelProperty(value = "投保人邮箱")
    private String email;


    public String getCName() {
        return cName;
    }

    public String getcName() {
        return cName;
    }

    public void setcName(String cName) {
        this.cName = cName;
    }

    public String getEName() {
        return eName;
    }

    public String geteName() {
        return eName;
    }

    public void seteName(String eName) {
        this.eName = eName;
    }
}
